const { sqlExec } = require('../db/mysql57');

const powerDao = {
    async checkPower(uid, powerName) {
        let sql = `select * from UserPower where uid = ? and powerId = (
                select id from Power where name = ?
            )`;
        let data = [ uid, powerName ];
        return sqlExec(sql, data);
    }
};

module.exports = powerDao;
